'''
Created on May 16, 2010

@author: roni
'''
import unittest
from ns2Scenario import Ns2Scenario
from projectConstants import ProjectConstants
import os
import logging

class Ns2ScenarioTester(unittest.TestCase):
    ''' Tester fpr Ns2Scenario class '''
    
    def setUp(self):
        self.temp_file = "../%s/Ns2ScenarioTester.temp" % ProjectConstants.RESROUCE_DIR 
        

    def tearDown(self):
        os.remove(self.temp_file)

    def testEq(self):
        scenario = Ns2Scenario("../%s/simple.scenario" % ProjectConstants.RESROUCE_DIR)
        scenario.save(self.temp_file)
        equal_scenario = Ns2Scenario(self.temp_file)
        self.assertTrue(equal_scenario==scenario)




if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()
    logging.basicConfig(level=logging.INFO)
    